
package com.quartet.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 分配状态 0:已分配 1：未分配
 * </p>
 *
 * @author Zheng Jie
 * @date 2020-05-07
 */
@Getter
@AllArgsConstructor
public enum AllocationStatusEnum {

    ALLOCATED("0", "已分配"),
    UNALLOCATED("1", "未分配");
    private final String value;
    private final String description;

    public static AllocationStatusEnum find(String val) {
        for (AllocationStatusEnum dataScopeEnum : AllocationStatusEnum.values()) {
            if (val.equals(dataScopeEnum.getValue())) {
                return dataScopeEnum;
            }
        }
        return null;
    }

}
